{extend name="public/base"}
{block name='main'}
<style type="text/css">
    .red {color: #FF5722!important;}
    .green {color: #5FB878!important;}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0px;">
    <legend>{$menuid|getmenuname}</legend>
</fieldset>
<form class="layui-form layui-form-pane" action="">
    <input type="hidden" name="menuid" value="{$menuid}" />
    <div class="my-btn-box">
     <span class="fl">
        <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">关键词</label>
              <div class="layui-input-inline">
                <input type="tel" name="keyword" placeholder="请输入关键词" lay-verify="required|phone" value="{$search.keyword}" class="layui-input">
              </div>
              <div class="layui-input-inline">
                 <button class="layui-btn mgl-20">搜索</button>
                 <a class="layui-btn layui-btn-normal" id="btn-add">发送新通知</a>
              </div>
            </div>
        </div>
     </span>
        <span class="fr">
       <a href="{:url('index', array('menuid'=>$menuid))}" class="layui-btn mgl-20">显示全部</a>
     </span>
    </div>
</form>
<form class="layui-form layui-form-pane" action="">
    <table class="layui-table">
        <colgroup>
            <col width="200">
            <col width="">
            <col width="200">
            <col width="100">
        </colgroup>
        <thead>
        <tr>
            <th>信息标题</th>
            <th>信息内容</th>
            <th>发送时间</th>
            <th>管理操作</th>
        </tr>
        </thead>
        <tbody id="userList">
        {volist name="list" id="val"}
            <tr>
                <td>{$val.title|strip_tags}</td><!--|msubstr=0,26-->
                <td>{$val.info|strip_tags}</td><!--|msubstr=0,26-->
                <td>{$val.create_time|date='Y-m-d H:i:s'}</td>
                <td><a href="javascript:void(0);"  data-uri="{:url('user_mail/delete', array('id'=>$val['id']))}" id="delete">删除</a></td>
            </tr>
        {/volist}
        </tbody>

    </table>
</form>

<div id="test-laypage-demo0">
    <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-29">
        {$list|raw}
    </div>
</div>
<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
    layui.use(['layer','jquery','form','element','table'], function () {
        //参数：layui、名称、模块名、主键（删除用）
        //新增弹窗
        Oper.config.add.width = '800px';
        Oper.config.add.height = '600px';

        //编辑弹窗
        Oper.config.edit.width = '800px';
        Oper.config.edit.height = '600px';
        Oper.initList(layui, '标签', 'user_mail', 'id');
    });
</script>
{/block}